﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MDI.Master" AutoEventWireup="true" CodeBehind="frmPedido.aspx.cs" Inherits="CapaPresentacion.frmPedido" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="assets/css/pedido.css" rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cuerpo" runat="server">
    <div class="row">
        <div class="col-lg-12">
            <ol class="breadcrumb">
                <li class="active"><i class="fa fa-dashboard"></i>Pedidos</li>
            </ol>
        </div>
    </div>
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">Buscar Productos</a></li>
            <li><a href="#tabs-2">Guardar Pedido</a></li>
        </ul>
        <div id="tabs-1">
            <div class="form-group input-group col-lg-4">
                <select class="form-control" id="almacen">
                </select>
            </div>
            <div class="form-group input-group  col-lg-8">
                <input type="text" class="form-control" id="producto_buscar_nombre">
                <span class="input-group-btn">
                    <button id="btn_modal_buscar_productos" class="btn btn-default" type="button"><i class="fa fa-search"></i></button>
                </span>
            </div>
            <div class="table-responsive">
                <table id="tbProductosBusqueda" class="table table-bordered table-hover tablesorter">
                    <thead>
                        <tr>
                            <th>Código</th>
                            <th>Presentación</th>
                            <th>Precio  S/.</th>
                            <th>Descuento %</th>
                            <th>Linea</th>
                            <th>Stock</th>
                            <th></th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
        <div id="tabs-2">
            <!-- /.row -->
            <div class="row">
                <form role="form" id="frmPedido">
                <div class="col-lg-12">

                    <div class="panel panel-default">                        
                            <div class="panel-body">
                                <div style="display: none;">
                                    <input id="idCliente"  name="idCliente"/>
                                </div>
                                <div class="col-lg-7">
                                    <div class="form-group">
                                        <label>Cliente </label>
                                        <input type="text" class="form-control" name="txtRazSocialCliente" id="txtRazSocialCliente" />
                                    </div>
                                </div>
                                <div class=" col-lg-5">
                                    <div class="form-group">
                                        <label>DNI/RUC</label>
                                        <input type="text" class="form-control" name="txtRucDni" id="txtRucDni" onfocus="this.blur()" />
                                    </div>
                                </div>
                                <div class=" col-lg-6">
                                    <div class="form-group">
                                        <label>Dirección de Entrega</label>
                                        <select id="sucursalCliente" name="sucursalCliente" class="form-control">
                                        </select>
                                    </div>
                                </div>
                                <div class=" col-lg-3">
                                    <div class="form-group">
                                        <label>Tipo Documento</label>
                                        <select class="form-control" id="tipDocumento" name="tipDocumento">
                                        </select>
                                    </div>
                                </div>
                                <div class=" col-lg-3">
                                    <div class="form-group">
                                        <label>Modo Pago</label>
                                        <select class="form-control" id="modoPago" name="modoPago">
                                        </select>
                                    </div>
                                </div>                                
                                <div class="col-lg-4">
                                    <div class="form-group">
                                        <label>Línea de Crédito</label>
                                        <input id="lineaCredito" name="lineaCredito" class="form-control" onfocus="this.blur()" />                                        
                                    </div>
                                </div>
                                <div class="col-lg-1">
                                    <div class="form-group">
                                        <label>Solicitar</label>
                                        <button type="button" id="btnAumento" class="btn btn-warning btn-sm">Aumento </button>
                                    </div>
                                </div>    
                                <div class=" col-lg-1">
                                    <div class="form-group">
                                         
                                    </div>
                                </div>                                                    
                                <div class="col-lg-4">
                                    <div class="form-group">
                                        <label>Deudas</label>
                                        <input id="deuda" name="deuda" class="form-control" onfocus="this.blur()" />
                                    </div>
                                </div>
                                <div class=" col-lg-1">
                                    <div class="form-group">
                                         <label>Solicitar</label>
                                        <button  type="button" id="btnPase" class="btn btn-warning btn-sm">   Pase   </button>
                                    </div>
                                </div>
                            </div>
                        
                    </div>
                </div>
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title"><i class="fa fa-money"></i>Detalle de Pedido</h3>
                        </div>
                        <div class="panel-body">
                            <div class="form-group">
                                <div class="table-responsive">
                                    <table id="tbDetalleProducto" class="table table-bordered table-hover tablesorter">
                                        <thead>
                                            <tr>
                                                <th>ID </th>
                                                <th>PRESENTACIÓN </th>
                                                <th>PRECIO S/.</th>
                                                <th>DESCUENTO S/.</th>
                                                <th>CANTIDAD </th>
                                                <th>IMPORTE S/.</th>
                                                <th></th>
                                            </tr>
                                        </thead>
                                    </table>
                                </div>
                                <div class="panel-body form-group">
                                    <div class=" col-lg-4">
                                        <div class="form-group">
                                            <label>Sub total S/.</label>
                                            <input id="subTotal" class="form-control" onfocus="this.blur()" />
                                        </div>
                                    </div>

                                    <div class=" col-lg-4">
                                        <div class="form-group">
                                            <label>I.G.V S/.</label>
                                            <input id="igv" class="form-control" onfocus="this.blur()" />
                                        </div>
                                    </div>
                                    <div class=" col-lg-4">
                                        <div class="form-group">
                                            <label>Total</label>
                                            <input id="total" name="total" class="form-control" onfocus="this.blur()" />
                                        </div>
                                    </div>
                                    <div class="modal fade" id="modalPase" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                        <div class="modal-dialog">
                                            <div class="modal-content">
                                                <div class="modal-header">
                                                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                                    <h4 class="modal-title" id="H1">Cantidad de Producto</h4>
                                                </div>
                                                <div class="modal-body">
                                                    <div class="row">
                                                        <div class=" col-lg-12">
                                                            <div class="form-group">
                                                                <label>Personal Autorizador</label>
                                                                <select class="form-control" id="autorizadorPase" name="autorizadorPase">
                                                                </select>  
                                                            </div>
                                                        </div>
                                                        <div style="display: non;">
                                                            <input name="idAutoPase" id="idAutoPase" value="0"/>
                                                            <input name="idPerAutoPase" id="idPerAutoPase" value="0" />                                                            
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="modal-footer">
                                                    <button type="button" class="btn btn-secundary" data-dismiss="modal">Cancelar</button>
                                                    <button id="btnAceptarPase" type="button" class="btn btn-primary" data-dismiss="modal">Aceptar</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="modal fade" id="modalAumento" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                        <div class="modal-dialog">
                                            <div class="modal-content">
                                                <div class="modal-header">
                                                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                                    <h4 class="modal-title" id="H2">Cantidad de Producto</h4>
                                                </div>
                                                <div class="modal-body">
                                                    <div class="row">
                                                        <div class=" col-lg-12">
                                                            <div class="form-group">
                                                                <label>Personal Autorizador</label>
                                                                <select class="form-control" id="autorizadorAumento" name="autorizadorAumento">
                                                                </select>  
                                                            </div>
                                                        </div>
                                                        <div style="display: non;">
                                                            <input name="idAutoAumento" id="idAutoAumento" value="0" />
                                                            <input name="idPerAutoAumento" id="idPerAutoAumento" value="0" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="modal-footer">
                                                    <button type="button" class="btn btn-secundary" data-dismiss="modal">Cancelar</button>
                                                    <button id="btnAceptarAumento" type="button" class="btn btn-primary" data-dismiss="modal">Aceptar</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    
                                </div>
                                
                                <div class="panel panel-default">
                                    <div class="col-lg-5"></div>
                                    <div class="panel-body col-lg-6">
                                        <button id="btnRegistrarPedido" type="button" class="btn btn-primary"><i class="fa fa-check"></i>Realizar Pedido </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                </form>
            </div>
        </div>
    </div>
    <!-- /.row -->
    <div class="row">
        <div class="col-lg-12">

            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="form-group col-lg-6">
                        <div class="form-group col-lg-3">
                            <label>DNI/RUC: </label>
                        </div>
                        <div class="form-group input-group col-lg-5">
                            <input id="txtNic" type="text" class="form-control" />
                            <span class="input-group-btn">
                                <button class="btn btn-default" type="button"><i class="fa fa-search"></i></button>
                            </span>
                        </div>
                        <div class="form-group  col-lg-4">
                            <button class="btn btn-default col-lg-8" type="button"><i class="fa fa-user"></i>Nuevo </button>
                        </div>
                        <div class="form-group col-lg-3">
                            <label>Cliente: </label>
                        </div>
                        <div class="form-group input-group  col-lg-9">
                            <%--  <input id="txtRazSocialCliente" type="text" class="razSocial form-control" />
                            <span class="input-group-btn">
                                <button class="btn btn-default" type="button"><i class="fa fa-search"></i></button>
                            </span>--%>
                        </div>
                        <div class="form-group col-lg-3">
                            <label>Sucursales: </label>
                        </div>
                        <div class="form-group col-lg-9">
                        </div>
                    </div>
                    <div class="form-group col-lg-6">
                        <label>Datos Financieros de Cliente: </label>
                        <div class="table-responsive">

                            <table class="table table-bordered table-hover tablesorter">
                                <thead>
                                    <tr>
                                        <th>Concepto</th>
                                        <th>Monto</th>
                                        <th>Solicitar</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>Línea de Crédito</td>
                                        <td>S/. 2500.00</td>
                                        <td>Aumento</td>
                                    </tr>
                                    <tr>
                                        <td>Por pagar</td>
                                        <td>S/. 3000.00</td>
                                        <td>Pase de deuda</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="col-lg-6">
                        <div class="form-group col-lg-4">
                            <label>Tido Documento: </label>
                        </div>

                        <div class="form-group col-lg-4">
                            <label>Almacén: </label>
                        </div>
                        <div class="form-group col-lg-8">
                            <%--<select class="form-control" id="almacen">
                               
                            </select>--%>
                        </div>
                    </div>
                    <div class="col-lg-6">
                        falta                                                             
                    </div>
                    <div class="col-lg-9">
                        <div class="col-lg-4"></div>
                        <div class="col-lg-6">
                            <button type="reset" class="btn btn-primary col-lg-9"><i class="fa fa-check"></i>Registrar Pedido </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Modal -->
    <div class="modal fade" id="modalCantidadProducto" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title" id="myModalLabel">Cantidad de Producto</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class=" col-lg-12">
                            <div class="form-group">
                                <label>Producto</label>
                                <input name="nom" id="nom" class="form-control" />
                            </div>
                        </div>
                        <div class=" col-lg-6">
                            <div class="form-group">
                                <label>Precio S/.</label>
                                <input name="pre" id="pre" class="form-control" />
                            </div>
                        </div>
                        <div class=" col-lg-6">
                            <div class="form-group">
                                <label>Stock</label>
                                <input name="stock" id="stock" class="form-control" />
                            </div>
                        </div>
                        <div class=" col-lg-12">
                            <div class="form-group">
                                <label>Cantidad</label>
                                <input type="text" class="form-control" id="producto_cantidad" autofocus="autofocus" value="1">
                            </div>
                        </div>

                        <div style="display: none;">
                            <input name="id" id="id" />
                            <input name="descuento" id="descuento" />
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secundary" data-dismiss="modal">Cancelar</button>
                    <button id="btn_agregar_cantidad" type="button" class="btn btn-primary" data-dismiss="modal">Aceptar</button>
                </div>
            </div>
        </div>
    </div>   

    <script src="assets/js/pedido.js"></script>
</asp:Content>
